<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.black{
				background-color: #000000;
				color: #FFFFFF;
			}
		</style>
		<script src="../../js/jquery-3.7.1.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				let n=0
			$(":button").bind("click",function(){
				n++
				if(n%2==1){
					$(document.body).addClass("black")
					$("button").addClass("black")
					$("button").html("明亮模式")
				}else {
					$(document.body).removeClass("black")
					$("button").removeClass("black")
					$("button").html("黑暗模式")
					}
			})
				
			})
			</script>
	</head>
	<body>
		这是网页内容
		<button type="button" style="float:right">黑暗模式</button>
	</body>
</html>
